use the child's requisition.height, not allocation.height, as width of
authorSoeren Sandmann <sandmann@daimi.au.dk>
Thu, 25 Apr 2002 18:39:43 +0000 (18:39 +0000)
committerSøren Sandmann Pedersen <ssp@src.gnome.org>
Thu, 25 Apr 2002 18:39:43 +0000 (18:39 +0000)
Thu Apr 25 20:24:37 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): use the child's
requisition.height, not allocation.height, as width of submenu
indicator. (#75948)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkmenuitem.c

index e9ad6c80c38e9c046e756462123f31955695b433..9a3a22cfe0f9029ae193b31babe272803d8486ad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Apr 25 20:24:37 2002  Soeren Sandmann  <sandmann@daimi.au.dk>
+
+       * gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): use the child's
+       requisition.height, not allocation.height, as width of submenu
+       indicator. (#75948)
+
 Thu Apr 25 00:26:34 2002  Kristian Rietveld  <kris@gtk.org>
 
        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_reset_default_sort_func):
index e9ad6c80c38e9c046e756462123f31955695b433..9a3a22cfe0f9029ae193b31babe272803d8486ad 100644 (file)
@@ -1,3 +1,9 @@
+Thu Apr 25 20:24:37 2002  Soeren Sandmann  <sandmann@daimi.au.dk>
+
+       * gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): use the child's
+       requisition.height, not allocation.height, as width of submenu
+       indicator. (#75948)
+
 Thu Apr 25 00:26:34 2002  Kristian Rietveld  <kris@gtk.org>
 
        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_reset_default_sort_func):
index e9ad6c80c38e9c046e756462123f31955695b433..9a3a22cfe0f9029ae193b31babe272803d8486ad 100644 (file)
@@ -1,3 +1,9 @@
+Thu Apr 25 20:24:37 2002  Soeren Sandmann  <sandmann@daimi.au.dk>
+
+       * gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): use the child's
+       requisition.height, not allocation.height, as width of submenu
+       indicator. (#75948)
+
 Thu Apr 25 00:26:34 2002  Kristian Rietveld  <kris@gtk.org>
 
        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_reset_default_sort_func):
index e9ad6c80c38e9c046e756462123f31955695b433..9a3a22cfe0f9029ae193b31babe272803d8486ad 100644 (file)
@@ -1,3 +1,9 @@
+Thu Apr 25 20:24:37 2002  Soeren Sandmann  <sandmann@daimi.au.dk>
+
+       * gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): use the child's
+       requisition.height, not allocation.height, as width of submenu
+       indicator. (#75948)
+
 Thu Apr 25 00:26:34 2002  Kristian Rietveld  <kris@gtk.org>
 
        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_reset_default_sort_func):
index e9ad6c80c38e9c046e756462123f31955695b433..9a3a22cfe0f9029ae193b31babe272803d8486ad 100644 (file)
@@ -1,3 +1,9 @@
+Thu Apr 25 20:24:37 2002  Soeren Sandmann  <sandmann@daimi.au.dk>
+
+       * gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): use the child's
+       requisition.height, not allocation.height, as width of submenu
+       indicator. (#75948)
+
 Thu Apr 25 00:26:34 2002  Kristian Rietveld  <kris@gtk.org>
 
        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_reset_default_sort_func):
index e9ad6c80c38e9c046e756462123f31955695b433..9a3a22cfe0f9029ae193b31babe272803d8486ad 100644 (file)
@@ -1,3 +1,9 @@
+Thu Apr 25 20:24:37 2002  Soeren Sandmann  <sandmann@daimi.au.dk>
+
+       * gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): use the child's
+       requisition.height, not allocation.height, as width of submenu
+       indicator. (#75948)
+
 Thu Apr 25 00:26:34 2002  Kristian Rietveld  <kris@gtk.org>
 
        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_reset_default_sort_func):
index 552c0f049845f3ca4bbcd9f32c979da3e65178ba..dfb753169f57f71eb14ab2db168e08500914e8d6 100644 (file)
@@ -497,6 +497,8 @@ gtk_menu_item_size_allocate (GtkWidget     *widget,
 
   if (bin->child)
     {
+      GtkRequisition child_requisition;
+      
       child_allocation.x = (GTK_CONTAINER (widget)->border_width +
                             widget->style->xthickness +
                            BORDER_SPACING);
@@ -508,9 +510,10 @@ gtk_menu_item_size_allocate (GtkWidget     *widget,
       child_allocation.width -= GTK_MENU_ITEM (widget)->toggle_size;
       child_allocation.x += widget->allocation.x;
       child_allocation.y += widget->allocation.y;
-      
+
+      gtk_widget_get_child_requisition (bin->child, &child_requisition);
       if (menu_item->submenu && menu_item->show_submenu_indicator)
-       child_allocation.width -= child_allocation.height;
+       child_allocation.width -= child_requisition.height;
 
       gtk_widget_size_allocate (bin->child, &child_allocation);
     }